var app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    newscode: '',
    newsresult: [],
    // 赛季选择器的数组
    season: [17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],

    // 赛季时装各个赛季的图片和文字数据
    fashion17: [
      {
        img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/17/7.png",
        id:"GoTo1"
      },
      {
        img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/17/8.png",
        id:"GoTo2"
      },
      {
        img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/17/1.png",
        id:"GoTo3"
      },
      {
        img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/17/2.png",
        id:"GoTo4"
      },
      {
        img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/17/3.png",
        id:"GoTo5"
      },
      {
        img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/17/4.png",
        id:"GoTo6"
      },
      {
        img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/17/5.png",
        id:"GoTo7"
      },
      {
        img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/17/6.png",
        id:"GoTo8"
      },
    ],

    fashion16: [
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/16/1.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/16/2.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/16/3.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/16/4.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/16/5.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/16/6.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/16/7.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/16/8.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/16/9.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/16/10.png"},
    ],

    fashion15: [
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/15/1.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/15/2.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/15/3.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/15/4.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/15/5.png"},
      {img: "	cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/15/6.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/15/7.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/15/8.png"},
    ],

    fashion14: [
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/14/1.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/14/2.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/14/3.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/14/4.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/14/5.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/14/6.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/14/7.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/14/8.png"},
    ],

    fashion13: [
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/13/1.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/13/2.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/13/3.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/13/4.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/13/5.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/13/6.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/13/7.png"},
    ],
    
    fashion12: [
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/12/1.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/12/2.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/12/3.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/12/4.png"},
    ],
    
    fashion11: [
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/11/1.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/11/2.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/11/3.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/11/4.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/11/5.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/11/6.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/11/7.png"},
    ],

    fashion10: [
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/10/1.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/10/2.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/10/3.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/10/4.png"},
    ],

    fashion9: [
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/9/1.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/9/2.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/9/3.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/9/4.png"},
    ],
    
    fashion8: [
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/8/1.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/8/2.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/8/3.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/8/4.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/8/5.png"},
    ],
    
    fashion7: [
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/7/1.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/7/2.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/7/3.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/7/4.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/7/5.png"},
    ],
    
    fashion6: [
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/6/1.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/6/2.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/6/3.png"},
      {img: "loud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/6/4.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/6/5.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/6/6.png"},
    ],
    
    fashion5: [
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/5/1.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/5/2.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/5/3.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/5/4.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/5/5.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/5/6.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/5/7.png"},
    ],
    
    fashion4: [
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/4/1.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/4/2.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/4/3.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/4/4.png"},
    ],
    
    fashion3: [
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/3/01.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/3/02.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/3/03.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/3/04.png"},
    ],
    
    fashion2: [
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/2/01.png"},
      {img: "cloud://caicren1-9ga67iu1c258fa35.6361-caicren1-9ga67iu1c258fa35-1307541336/show/2/02.png"},
    ],

    navbar: ['SS17 赛季', 'SS16 赛季', 'SS15 赛季', 'SS14 赛季', 'SS13 赛季', 'SS12 赛季', 'SS11 赛季', 'SS10 赛季', 'SS9 赛季', 'SS8 赛季', 'SS7 赛季', 'SS6 赛季', 'SS5 赛季', 'SS4 赛季', 'SS3 赛季', 'SS2 赛季'],
    currentTab: 0,
  },

  navbarTap: function (e) {
    this.setData({
      currentTab: e.currentTarget.dataset.idx
    })
  },

  //   /**
  //    * 生命周期函数--监听页面加载
  //    */
    onLoad: function (options) {
        // 电竞资讯
        var _this = this
        // wx.request({
        //   url: 'http://api.tianapi.com/esports/index',
        //   method: 'GET',
        //   data: {
        //     key: "27c57dac5e492988aa5fc95d92b3783a",
        //     num: "20"
        //   },
        //   success: function (res) {
        //     console.log(res.data)
        //     _this.setData({
        //       newscode: res.data.code,
        //       newsresult: res.data.newslist
        //     })
        //   }
        // })

        //游戏资讯 
        var _this = this
        wx.request({
          url: 'http://api.tianapi.com/game/index',
          method: 'GET',
          data: {
            key: "27c57dac5e492988aa5fc95d92b3783a",
            num: "10"
          },
          success: function (res) {
            // console.log(res.data)
            _this.setData({
              newscode: res.data.code,
              newsresult: res.data.newslist
            })
          }
        })

        // 显示加载中
        wx.showLoading({
          title: '加载中',
        })
        setTimeout(function () {
          wx.hideLoading()
        }, 1500)
      },

    /**
   * 页面上拉触底事件的处理函数
   */
  // onReachBottom: function () {
    
  // },
  dropDown(){
    this.setData({
      Wrap: "pre-wrap",
      disp1: "none",
      disp2: "block"
    })
  },

  dropUp(){
    this.setData({
      Wrap: "nowrap",
      disp1: "block",
      disp2: "none"
    })
  },

  GoTo1(){
    wx.redirectTo({
      url: '../../pages/showBox/showClthes01/showClthes',
    })
  },

  GoTo2(){
    wx.redirectTo({
      url: '../../pages/showBox/showClthes/showClthes',
    })
  },

  GoTo16(){
    wx.redirectTo({
      url: '../../pages/showBox/showClthes16/showClthes',
    })
  },

  GoToss2(){
    wx.redirectTo({
      url: '../../pages/showBox/showClthes2/showClthes',
    })
  },

  GoTo10(){
    wx.redirectTo({
      url: '../../pages/showBox/showClthes10/showClthes',
    })
  },

  GoTo15(){
    wx.redirectTo({
      url: '../../pages/showBox/showClthes15/showClthes',
    })
  },

  GoTo3(){
    wx.redirectTo({
      url: '../../pages/showBox/showClthes3/showClthes',
    })
  },

  GoTo6(){
    wx.redirectTo({
      url: '../../pages/showBox/showClthes12h/showClthes',
    })
  },

  GoTo5(){
    wx.redirectTo({
      url: '../../pages/showBox/showClthes11h/showClthes',
    })
  },

  GoTo4(){
    wx.redirectTo({
      url: '../../pages/showBox/showClthes13h/showClthes',
    })
  },

  GoTo9(){
    wx.redirectTo({
      url: '../../pages/showBox/showClthes9/showClthes',
    })
  },

  GoTo14(){
    wx.redirectTo({
      url: '../../pages/showBox/showClthes14/showClthes',
    })
  },

  GoTo8(){
    wx.redirectTo({
      url: '../../pages/showBox/showClthes0170/showClthes',
    })
  },
})